package huaweiod.first;

import java.util.Scanner;

/**
 * 华为机试真题 Java 实现【对称美学】【2022.11 Q4 新题】
 */
public class A_2023_36_SymmetryAesthetics {

    public static char process(long n, double k) {
        if (n == 1) {
            return 'R';
        }
        if (n == 2) {
            return k == 0 ? 'B' : 'R';
        }
        double len = 1L << (n - 2);
        if (k >= len) {
            double pos = k - len;
            return process(n - 1, pos);
        } else {
            return process(n - 1, k) == 'B' ? 'R' : 'B';
        }
    }

    // 1
    // 64 73709551616
    // red
    public static void main(String[] args) {
        // 处理输入
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();

        for (int i = 0; i < t; i++) {
            long n = in.nextLong();
            double k = in.nextDouble();
            String res = process(n, k) == 'R' ? "red" : "blue";
            System.out.println(res);
        }
    }
}
